← Back to issue list

Running several instances of snapcraft in parallel for a given snap name results in failures to acquire an apt lock file

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1869030
Type
issue
State
open
Author
~osomon
Labels
Created
2020-03-25 15:41:46.081158+00:00
Updated
2020-03-25 15:49:27.579786+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

Use case: I'm working on upstreaming the snap packaging of chromium, and the chromium CI jobs try to build 3 snaps in parallel (for stable, beta and unstable). Those are initiated from three separate directories but different instances of snapcraft compete for the same apt lock file, because the three snaps have the same name, and thus use the same shared multipass VM. This is the error: Sorry, an error occurred in Snapcraft: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/apt/cache.py", line 67, in __enter__ return self._lock.__enter__() SystemError: E:Could not get lock /home/chrome-bot/.cache/snapcraft/stage-packages/apt/0a910a73dbfd95c039f21b0fb2811cf7f339c9ad5da3b03eb5ba0c07fdc735c7cf8239eae76c933d6abf4a5b5847feff/var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) Should snapcraft allow specifying a unique VM/container name, to avoid clashes?

Evaluation history

No evaluation history available.